package com.system.controller;



import com.system.service.PrinterService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/system/printer")
public class PrinterController {

    @Autowired
    private PrinterService iprinterService;
    /**
     * 检测设备导出pdf，用于打印设备信息
     */
    @PostMapping("/exportPdf")
    public void exportPdf(Map<String, Object> map) throws Exception {
//        Map<String, Object> map = iDeviceDetailExSnapService.selectExPdf(bo);
//        PdfUtils.generatePDFAndWriteToResponse("files/device_detail_ex_snap_biaoqian.pdf", map,response);
        if (map==null){
            return;
        }
//        String s = PdfUtils.generatePDF("files/device_detail_ex_snap_biaoqian2.pdf", "./设备信息.pdf", map);

//        iprinterService.generationContract("files/device_detail_ex_snap_biaoqian2.pdf","./设备信息.pdf",map);

//        iprinterService.printPdf("./设备信息.pdf", );
    }

}
